home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 1
/
Gold Medal Software Volume 1 (Gold Medal) (1994).iso
/
prog
/
dasv10_.arj
/
GETMOUS.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-08-10
|
346 b
|
22 lines
// mouse.lib function getmouse()
#include <dos.h>
void getmouse(int *mx, int *my, int *button){
long far *mvector;
union REGS in, out;
FP_SEG(mvector)=0x0000;
FP_OFF(mvector)=0x00cc;
if (*mvector){
in.x.ax=3;
in.x.bx=in.x.cx=in.x.dx=0;
int86(0x33, &in, &out);
*mx=out.x.cx;
*my=out.x.dx;
*button=out.x.bx;
}
}